using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MyLib;

namespace ImportSubscriber
{
    public partial class frmDatabaseSetting : Form
    {
        public bool save = false;

        public frmDatabaseSetting()
        {
            InitializeComponent();
        }

        private void frmDatabaseSetting_Load(object sender, EventArgs e)
        {
            //tb_ConnectString.Text = AccessDB.ReadConfig(frmMain.CONFIG_CONNECTSTRING, "");
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            //if (!AccessDB.WriteConfig(frmMain.CONFIG_CONNECTSTRING, tb_ConnectString.Text.Trim()))
            //{
            //    MessageBox.Show("Save settings failed! " + AccessDB.GetLastError());
            //    return;
            //}
            //MessageBox.Show("Save settings successfully!");
            //save = true;
            //Close();
        }

        private void btn_wizard_Click(object sender, EventArgs e)
        {
            frmConnectionStringWizard frm = new frmConnectionStringWizard();
            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                tb_ConnectString.Text = frm.ConnectionString;
        }

    }
}